package user

import (
	"fmt"
	"github.com/gin-gonic/gin"
	models "mz_water/model"
	"mz_water/util"
	"net/http"
)

func GetUserList(c *gin.Context) {
	type Money struct {
		User   models.User `gorm:"ForeignKey:UserId;AssociationForeignKey:Id"`
		UserId string      `gorm:"column:UserId"`
	}
	var mz_user = []models.User{}
	//models.GetDb().Find(&mz_user)
	util.GetDb().Model(mz_user).Related(&Money{})
	fmt.Println(&mz_user)
	c.HTML(http.StatusOK, "users/index.tmpl", &mz_user)
}
